<?php /* Delete Group Controller */
	if (isset($_POST['form-action'])) {
		$plan->delete((int)$glb_uri[2]);
		require_once('modules/plans/actions/list/index.php');
	} else { //sino envio el formulario
		if (@(int)$glb_uri[2] > 0) { //valida que la id ingresa es valida.
			$result = $plan->getAllFrom((int)$glb_uri[2]);
			if ($result) { //valida si existe la id.
				require_once('modules/plans/actions/delete/view/delete-plan.php');
			} else {
				echo '<strong>No existe el plan solicitado.</strong>';
			}
		} else {
			echo '<strong>Pagina invalida.</strong>';
		}
	}
?>